<template>
	<view class="page">
		<view class="user-info">
			<u-avatar :src="userInfo.avatar_url" size="50"></u-avatar>
			<view class="user-nickname u-line-1">
				<!-- <u-icon name="account-fill" color="#273368" size="28"></u-icon> -->
				<text class="u-line-1">{{userInfo.nick_name}}</text>
			</view>
		</view>
		<view class="head-title">积分流水</view>
		<view class="list">
			<view class="item" v-for="(item,index) in list" :key="index">
				<view class="left">
					<view class="dot"></view>
					<view class="line"></view>
				</view>
				<view class="right">
					<u--text :text="item.name" size="20"></u--text>
					<u--text :text="item.date" type="info"></u--text>
					<u--text :text="item.number" size="20" type="primary"></u--text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				userInfo: {
					avatar_url: "https://cdn.uviewui.com/uview/goods/1.jpg",
					nick_name: "昵称"
				},
				list: [{
						name: '打卡青春跑线路',
						date: '2022-12-22 10:30',
						number: '+60'
					},
					{
						name: '打卡青春跑线路',
						date: '2022-12-22 10:30',
						number: '+60'
					},
					{
						name: '打卡青春跑线路',
						date: '2022-12-22 10:30',
						number: '+60'
					},
				]
			}
		},
		methods: {
			gotoDetail() {
				let id = 1;
				uni.navigateTo({
					url: '/pages/gift/detail?id=' + id
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.page {
		background-color: #f8f8f8;


		.user-info {
			padding: 34rpx 20rpx;
			margin-bottom: 40rpx;
			display: flex;
			align-items: center;

			.user-nickname {
				margin-left: 30rpx;
				display: flex;
				align-items: center;

				&>text {
					font-size: 20;
					font-weight: bold;
					font-family: 'Segoe UI';
				}
			}
		}

		.head-title {
			margin: 20rpx;
			font-weight: bold;
			font-size: 32rpx;
		}

		.list {
			margin: 20rpx;
			padding: 40rpx;
			background-color: #FFF;
			border-radius: 10rpx;

			.item {
				display: flex;
				margin-bottom: 20rpx;

				.left {
					width: 80rpx;

					.dot {
						margin-bottom: 15rpx;
						width: 25rpx;
						height: 25rpx;
						border-radius: 15rpx;
						background-color: #ffd91d;
					}

					.line {
						margin-left: 10rpx;
						width: 5rpx;
						height: 100rpx;
						background-color: #ffd91d;
					}
				}

				.right {}
			}
		}
	}
</style>
